using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace vtpsms.dao.Models.Mapping
{
    public class GROUP_INFOMap : EntityTypeConfiguration<GROUP_INFO>
    {
        public GROUP_INFOMap()
        {
            // Primary Key
            this.HasKey(t => t.GroupId);

            // Properties
            this.Property(t => t.GroupName)
                .IsRequired()
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("GROUP_INFO");
            this.Property(t => t.GroupId).HasColumnName("GroupId");
            this.Property(t => t.GroupName).HasColumnName("GroupName");
            this.Property(t => t.CreateAt).HasColumnName("CreateAt");
        }
    }
}
